import { Module } from "@nestjs/common";
import { TypeOrmModule } from "@nestjs/typeorm";
import { GoodsController } from "src/controller/GoodsController";
import { GoodsPriceController } from "src/controller/GoodsPriceController";
import { TypeController } from "src/controller/TypeController";
import { Goods } from "src/entity/Goods";
import { GoodsPrice } from "src/entity/GoodsPrice";
import { Stock } from "src/entity/Stock";
import { Type } from "src/entity/Type";
import { Unit } from "src/entity/Unit";
import { GoodsPriceService } from "src/service/GoodsPriceService";
import { GoodsService } from "src/service/GoodsService";
import { TypeService } from "src/service/TypeService";
import { UnitModule } from "./StockModule";

@Module({
    imports: [
        TypeOrmModule.forFeature([
            Goods,
            GoodsPrice,
            Type,
            Unit,
            Stock
        ]),
        UnitModule
    ],
    controllers: [
        GoodsController,
        TypeController,
        GoodsPriceController
    ],
    providers: [
        GoodsService,
        GoodsPriceService,
        TypeService
    ],
    exports: [
        GoodsService,
        TypeService
    ]
})
export class GoodsModule{}